package com.bcbim.operation_maintenance.table_head.service;

import com.bcbim.operation_maintenance.table_head.mapper.SpaceOccupyTableHeadMapper;
import com.bcbim.operation_maintenance_interface.table_head.service.SpaceOccupyTableHeadService;
import com.bcbim.operation_maintenance_interface.table_head.vo.SpaceOccupyTableHeadVO;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @Description: 空间占用表头设置service实现类
 * @Author lihonggang
 * @Date 2022/04/28  17:41
 * @Version V1.0
 **/
@Service(timeout = 60 * 1000, group = "spaceOccupyTableHead", version = "1.0.0")
public class SpaceOccupyTableHeadServiceImpl implements SpaceOccupyTableHeadService {

     @Autowired
     private SpaceOccupyTableHeadMapper spaceOccupyTableHeadMapper;

    /**
     * @param userId
     * @Description: 判断用户是否设置过表头
     * @Date: 2022/4/28 16:32
     * @Param: [userId]
     * @return: int
     * @Author: lihonggang
     */
    @Override
    public int checkSpaceTableHeadByUserId(String userId) {
        return spaceOccupyTableHeadMapper.checkSpaceTableHeadByUserId(userId);
    }

    /**
     * @param userId
     * @Description: 查询表头设置列表
     * @Date: 2022/4/28 17:35
     * @Param: [userId]
     * @return: java.util.List<com.bcbim.model_interface.table_head.vo.SpaceOccupyTableHeadVO>
     * @Author: lihonggang
     */
    @Override
    public List<SpaceOccupyTableHeadVO> listSpaceOccupyTableHead(String userId) {
        return spaceOccupyTableHeadMapper.listSpaceOccupyTableHead(userId);
    }
}
